package com.upcode.weighing.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.upcode.weighing.base.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 资源表
 * </p>
 *
 * @author alex
 * @since 2019-04-10
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class SysRes extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;//资源ID
    @JsonSerialize(using= ToStringSerializer.class)
    private Long pid;//父级ID
    private String name;//菜单名称
    private String permission;//资源权限名称(自定义,不能重复)
    private String url;//url(路径链接:当前指在vue中的路由名称)
    private Integer sortNum;//排序(菜单顺序 1级为0 2级为1 3级为2......)
    private Integer attach;//1:pc端，2:app端
    private String icon1;//PC菜单图片
    private String icon2;//APP菜单图片
    private String pids;//TreeTable排序(所有父级ID集合，多个父级ID用逗号隔开,例如(0,1,3))
    private Integer type;//1:菜单2 :按钮
    private String des;//备注（备注当前菜单属于几级菜单）
    private Integer status;//状态1 可用 0 不可用 -1: 删除
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//修改时间
    private String vueKey;//vue中所需要的key
    private List<SysRes> childRes;//子菜单



}
